﻿#include<iostream>
using namespace std;
int main() {

	//水仙花
	int g, s, b;
	for (int i = 100; i < 1000; i++) {
		g = i % 10;
		s = i / 10 % 10;
		b = i / 100;

		if (g * g * g + s * s * s + b * b * b == i) {
			cout << "水仙花数：" << i << endl;
		}
	}

	//完数
	for (int i = 4; i < 1000; i++) {
		int sum{};
		for (int a = 1; a < i; a++) {
			if (i % a == 0)sum += a;
		}
		if (sum == i)cout << "完数：" << i << endl;
	}
}